import { dataDispose } from '../../assets/comFun'
//导航栏icon
import { DatabaseOutlined } from "@ant-design/icons"
//page
// 费用收纳 ->  应收-实收
import ActualMoney from './CostCapture/ActualMoney'
//费用收纳 -> 保证金/押金
import EarnestMoney from './CostCapture/EarnestMoney'
//支付列表 -> 列表
import PaymentList from './Payment/PaymentList'
//已支付列表
import OverPaymentList from './Payment/OverPaymentList'
//费用收纳 -> 扣款列表
import Deduction from './CostCapture/Deduction'
//费用收纳 -> 登记到账
import RegisterMoney from './CostCapture/RegisterMoney';
//费用收纳 -- 开票等级
import InvoicingLevel from './CostCapture/InvoicingLevel';
//回款统计
import CollectionStatisticsList from './CollectionStatistics/CollectionStatisticsList'

/**
 * @description: 财务管理模块
 * @author: xiaoxujs
 * @updata: xiaoxujs(2021-9-08) 添加权限
 */

//侧边栏数据
const menuFinancialModule = [
    {
        key: 'costCapure',
        meta: {
            title: "费用收纳",
            icon: <DatabaseOutlined />,
        },
        authority: 'FYSN',
        path: "/ActualMoney",
        component: ActualMoney,
        page: [
            {
                key: 'actualMoney',
                meta: {
                    title: "应收/实收",
                    icon: <DatabaseOutlined />,
                },
                authority: 'YSSS',
                path: "/actualMoney",
                component: ActualMoney,
            },
            {
                key: 'earnestMoney',
                meta: {
                    title: "保证金押金",
                    icon: <DatabaseOutlined />,
                },
                authority: 'BZJ',
                path: "/earnestMoney",
                component: EarnestMoney,
            },
            {
                key: 'invoicingLevel',
                meta: {
                    title: "开票登记",
                },
                authority: 'BZJ',
                path: "/financialManagementModule/costCapture/invoicingLevel",
                component: InvoicingLevel,
            }
        ],
    },
    {
        key: 'payment',
        meta: {
            title: "支付列表",
            icon: <DatabaseOutlined />,
        },
        authority: 'ZFLB',
        path: "/awaitPaymentList",
        component: PaymentList,
        page: [
            {
                key: 'awaitPaymentList',
                meta: {
                    title: "待支付",
                    icon: <DatabaseOutlined />,
                },
                authority: 'DZF',
                path: "/awaitPaymentList",
                component: PaymentList,
            },
            {
                key: 'overPaymentList',
                meta: {
                    title: "已支付",
                    icon: <DatabaseOutlined />,
                },
                authority: 'YZF',
                path: "/overPaymentList",
                component: OverPaymentList,
            }
        ],
    },
    {
        key: 'financialManagementModuleCollectionStatisticsList',
        meta: {
            title: "回款统计",
            icon: <DatabaseOutlined />,
        },
        authority: 'ZFLB',
        path: "/financialManagementModule/collectionStatistics/list",
        component: CollectionStatisticsList
    }
]
//侧边栏数据转成路由
let menuLeftFinancialModuleRouterPage = dataDispose(menuFinancialModule);

const financialManagementModulePage = [
    ...menuLeftFinancialModuleRouterPage,
    {
        path: '/deduction',
        component: Deduction
    },
    {
        path: '/registerMoney',
        component: RegisterMoney
    }
]

export {
    menuFinancialModule,
    financialManagementModulePage
}

